/**
 * @method table表格的标题
 */
export const columns = [
    {
        title: '资产编号',
        dataIndex: 'code',
        slotName: 'code',
        ellipsis: true,
        width: 100,
    },
    {
        title: '资产名称',
        dataIndex: 'name',
        slotName: 'name',
        ellipsis: true,
        width: 110,
    },
    {
        title: '资产版本',
        dataIndex: 'version',
        slotName: 'version',
        ellipsis: true,
        width: 100,
    },
    {
        title: '入表金额',
        dataIndex: 'rubiao_amount',
        slotName: 'rubiao_amount',
        ellipsis: true,
        width: 100,
    },
    {
        title: '摊销方式',
        dataIndex: 'method',
        slotName: 'method',
        ellipsis: true,
        width: 100,
    },
    {
        title: '使用寿命（年）',
        dataIndex: 'useful_life',
        slotName: 'useful_life',
        ellipsis: true,
        width: 110,
    },
    {
        title: '摊销进度',
        dataIndex: 'amortization_status',
        slotName: 'amortization_status',
        width: 120,
    },
    {
        title: '下次摊销金额',
        dataIndex: 'amortization_amount',
        slotName: 'amortization_amount',
        width: 120,
    },
    {
        title: '下次摊销时间',
        dataIndex: 'amortization_date',
        slotName: 'amortization_date',
        width: 180,
    },
    {
        title: '剩余金额',
        dataIndex: 'remaining_amount',
        slotName: 'remaining_amount',
        width: 150,
    },
    {
        title: '操作',
        slotName: 'operator',
        width: 200,
        fixed: 'right',
        align: 'right'
    }
];
export const tableData = [
    {
        id: 1,
        code: '0001',
        name: '资产名称',
        version: 'V1.0',
        rubiao_amount: '0',
        method: '直线法',
        useful_life: '6',
        amortization_status: '0',
        amortization_amount: '166.67',
        amortization_date: '2021-09-01',
        remaining_amount: '0',
    },
    {
        id: 2,
        code: '0002',
        name: '资产名称',
        version: 'V1.0',
        rubiao_amount: '0',
        method: '直线法',
        useful_life: '6',
        amortization_status: '0',
        amortization_amount: '166.67',
        amortization_date: '2021-09-01',
        remaining_amount: '0',
    }
]



export const showDetailTableData = [
    {
        title: '归属时间',
        dataIndex: 'belong_cycle',
        slotName: 'belong_cycle',
    },
    {
        title: '摊销进度',
        dataIndex: 'cycle_number',
        slotName: 'cycle_number',
    },
    {
        title: '摊销金额',
        dataIndex: 'amount',
        slotName: 'amount',
    },
    {
        title: '操作时间',
        dataIndex: 'cycle_start_time',
        slotName: 'cycle_start_time',
    },
]


export const planTableColumns = [
    {
        title: '归属时间',
        dataIndex: 'belong_cycle',
        slotName: 'belong_cycle',
    },
    {
        title: '摊销进度',
        dataIndex: 'cycle_number',
        slotName: 'cycle_number',
    },
    {
        title: '摊销金额',
        dataIndex: 'amount',
        slotName: 'amount',
    },
    {
        title: '摊销时间',
        dataIndex: 'cycle_start_time',
        slotName: 'cycle_start_time',
    },
]
export const planTableData = [
    {
        id: 1,
        belong_cycle: '2021-09-01',
        cycle_number: '1',
        amount: '166.67',
        cycle_start_time: '2021-09-01',
    },
    {
        id: 2,
        belong_cycle: '2021-09-01',
        cycle_number: '1',
        amount: '166.67',
        cycle_start_time: '2021-09-01',
    }
]

export const planDetailTableColumns = [
    {
        title: '序号',
        dataIndex: 'index',
        slotName: 'index',
    },
    {
        title: '本期摊销周期',
        dataIndex: 'periodicity',
        slotName: 'periodicity',
    },
    {
        title: '累计摊销期数',
        dataIndex: 'amortization_step'
    },
    {
        title: '本期摊销金额',
        dataIndex: 'amount'
    },
    {
        title: '累计摊销金额',
        dataIndex: 'total_amount'
    },
    {
        title: '待摊金额',
        dataIndex: 'remaining_amount'
    },
    {
        title: '待摊期数',
        dataIndex: 'remaining_period'
    },
    {
        title: '摊销时间',
        dataIndex: 'time'
    }
]
export const planDetailTableData = [
    {
        id: 1,
        amortization_step:"21321",
        periodicity: '2021-09-01',
        amount: '166.88',
        total_amount: '166.67',
        remaining_amount: '0',
        remaining_period: '0',
        time: '2021-09-01',
    },
    {
        id: 2,
        periodicity: '2021-09-01',
        amortization_step: '1',
        amount: '166.67',
        total_amount: '166.67',
        remaining_amount: '0',
        remaining_period: '0',
        time: '2021-09-01',
    }
]

export const  columsPDF  = [
    {
        title: '摘要',
        dataIndex: 'template_summary',
        slotName: 'template_summary',
        ellipsis: true,
        width: 100,
        align:'center'
    },
    {
        title: '科目名称',
        dataIndex: 'template_subject',
        slotName: 'template_subject',
        ellipsis: true,
        width: 110,
        align:'center'
    },
    {
        title: '借方金额',
        dataIndex: 'debit_amount',
        slotName: 'debit_amount',
        ellipsis: true,
        width: 100,
        align:'center'
    },
    {
        title: '贷方金额',
        dataIndex: 'credit_amount',
        slotName: 'credit_amount',
        ellipsis: true,
        width: 110,
        align:'center'
    },
]


export const Rules = {
    asset_planning: [
        { required: true, message: '请选择资产规划', trigger: 'change' }
    ],
    useful_life: [
        { required: true, message: '请选择使用寿命', trigger: 'change' },
    ],
    calculation_type: [{ required: true, message: '请选择计算公式', trigger: 'blur' }],
    description: [{ required: true, message: '请选输入判断依据', trigger:  ['change', 'blur'] }],
    upload_file: [{ required: true, message: '请上传文件', trigger: 'change' }],
};
